#CC=i686-redhat-linux-gcc
#CXX=i686-redhat-linux-g++
CC=gcc
CXX=g++
CFLAGES= -g3 
INCDIR=
LIBS= -lpthread -lboost_system
SRC=$(shell ls *.cpp)
OBJ=$(SRC:.cpp=.o)
Target=encryptedtunnel
all:clean $(Target)
$(Target):$(OBJ)
	$(CXX) $(CFLAGES) $(INCDIR) -o $(Target) $^ $(LIBS)
%.o:%.cpp
	$(CXX) $(CFLAGES) $(INCDIR) -c $< -o $@  
%.o:%.cc
	$(CXX) $(CFLAGES) -c $< -o $@ $(LIBS) 
%.o:%.c
	$(CC) $(CFLAGES) -c $< -o $@ $(LIBS)
clean:
	@rm -rf *.o
	@ ! [ -f $(Target) ] || rm $(Target)
